export class JSONResponse {
    static success(data: any, msg = "success") {
        return {
            code: 200,
            msg,
            data
        }
    }

    static notfound() {
        return {
            code: 404,
            msg: '请求路径不存在',
            data: null
        }
    }

    static error(data, msg = "error") {
        return {
            code: 500,
            msg,
            data
        }
    }
}